package stark.app.function.dialog;

import com.lxj.xpopup.interfaces.OnInputConfirmListener;

import stark.app.R;
import stark.app.databinding.ActivityFuncDialogDemoBinding;
import stark.common.basic.base.BaseNoModelActivity;
import stark.common.basic.utils.DialogUtil;

/**
 * Author：daizhongbin on 2021/4/12
 * Email：1027154338@qq.com
 * Desc:
 */
public class FuncDialogDemoActivity extends BaseNoModelActivity<ActivityFuncDialogDemoBinding> {

    @Override
    protected int onCreate() {
        return R.layout.activity_func_dialog_demo;
    }

    @Override
    protected void initView() {
        mDataBinding.btConfirmLight.setOnClickListener(v -> {
            DialogUtil.asConfirm(this, "标题", "内容区域，设置您自己想要显示的内容", null);
        });
        mDataBinding.btConfirmNight.setOnClickListener(v -> {
            DialogUtil.asConfirmDarkTheme(this, "标题", "内容区域，设置您自己想要显示的内容", null);
        });
        mDataBinding.btConfirmCustom.setOnClickListener(v -> {
            DialogUtil.asConfirm(this, "标题", "内容区域，设置您自己想要显示的内容",
                    null, null, null, null,
                    false, R.layout.dialog_confirm_cancel_custom);
        });
        mDataBinding.btConfirm1.setOnClickListener(v -> {
            DialogUtil.asConfirm(this, "标题", "内容区域，设置您自己想要显示的内容",
                    null, null, null, null,
                    true);
        });
        mDataBinding.btConfirmInput.setOnClickListener(v -> {
            DialogUtil.asInputConfirm(this, "标题", null, new OnInputConfirmListener() {
                @Override
                public void onConfirm(String text) {
                }
            });
        });
    }

    @Override
    protected void initData() {
    }

}
